package com.oyo.common.enums;

/**
 * @author zhangyang
 * @date 2018/7/25 版本判断辅助类
 */
public class VersionHelper {

	public static boolean gt(EnumVersion left, EnumVersion right) {
		// Assert.notNull(left, "版本号判断左边参数为空");
		// Assert.notNull(right, "版本号判断右边参数为空");

		return left.getCode() > right.getCode();
	}

	public static boolean lt(EnumVersion left, EnumVersion right) {
		// Assert.notNull(left, "版本号判断左边参数为空");
		// Assert.notNull(right, "版本号判断右边参数为空");

		return left.getCode() < right.getCode();
	}

	public static boolean gte(EnumVersion left, EnumVersion right) {
		// Assert.notNull(left, "版本号判断左边参数为空");
		// Assert.notNull(right, "版本号判断右边参数为空");

		return left.getCode() >= right.getCode();
	}

	public static boolean lte(EnumVersion left, EnumVersion right) {
		// Assert.notNull(left, "版本号判断左边参数为空");
		// Assert.notNull(right, "版本号判断右边参数为空");

		return left.getCode() <= right.getCode();
	}

	public static boolean eq(EnumVersion left, EnumVersion right) {
		// Assert.notNull(left, "版本号判断左边参数为空");
		// Assert.notNull(right, "版本号判断右边参数为空");

		return left.getCode() == right.getCode();
	}

	public static void main(String[] args) {

	}

}
